package com.ssyt.blog.core.sys.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.ssyt.blog.core.common.BaseDao;
import com.ssyt.blog.core.sys.entity.Category;

@Repository
public class CategoryDao extends BaseDao<Category, Integer> {

	public void categoryInfoDelete(Integer id) {
		Category category = load(id);
		delete(category);
	}

	public List<Category> getCategory(Integer userId) {
		return listEntityByHql("FROM Category WHERE userId=?", userId);
	}

}
